

#include <iostream>
#include <opencv2/opencv.hpp>

#include <sys/time.h>

int main(int argc, char **argv) {

    cv::Mat img;
    img = cv::imread("../0066_02_1.jpg");
    cv::setNumThreads(0);
    while (true) {

        timeval t1 = {NULL, NULL};
        timeval t2 = {NULL, NULL};

        gettimeofday(&t1, NULL);
        cv::resize(img, img, cv::Size(1280, 800));
        cv::resize(img, img, cv::Size(1920, 1080));
        cv::resize(img, img, cv::Size(2560, 1440));
        cv::resize(img, img, cv::Size(800, 600));
        cv::resize(img, img, cv::Size(400, 400));
        gettimeofday(&t2, NULL);

        std::cout << "resizing cost: " << 1000 * (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) / 1000 << " ms."
                  << std::endl;
    }

}

